namespace Expect.Documentation.Fixtures_reference
{
    using System;
    using Expect.Core;
    using Expect.Core.Fixtures;
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    
    
    // This file is generated, if you modify content you will lose your modifications when the generator will regenerate the file
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Expect.Core", "0.5.2.0")]
    [System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    [TestClass()]
    [SpecificationContainerAttribute(Name="ObjectFeedFixture", Path="\\Fixtures reference\\ObjectFeedFixture.expect")]
    public partial class ObjectFeedFixtureContainer : Expect.Core.AbstractSpecificationContainer
    {
        
        partial void PrepareContextExtension();
        
        partial void BeforeInitExtension();
        
        partial void AfterInitExtension();
        
        partial void BeforeTeardownExtension();
        
        partial void AfterTeardownExtension();
        
#line 1 "ObjectFeedFixture.expect"
#line hidden
        
        public override void InitializeContext()
        {
            base.InitializeContext();
            PrepareContextExtension();
        }
        
        [TestInitialize()]
        public virtual void ObjectFeedFixtureClass_TestInit()
        {
            InitializeContext();
            BeforeInit();
            BeforeInitExtension();

            SpecificationDefinition spec = new SpecificationDefinition();
            spec.CalculateResult();

            if ((spec.Status.Success.HasValue == false))
            {
                Assert.Inconclusive(spec.GetMessageForInconclusiveResult());
            }
            if ((spec.Status.Success.Value == false))
            {
                Assert.Fail(spec.GetMessageForFailedResult());
            }

            AfterInit();
            AfterInitExtension();
        }
        
        [TestCleanup()]
        public virtual void ObjectFeedFixtureClass_TestTeardown()
        {
            BeforeTeardown();
            BeforeTeardownExtension();

            SpecificationDefinition spec = new SpecificationDefinition();
            spec.CalculateResult();

            if ((spec.Status.Success.HasValue == false))
            {
                Assert.Inconclusive(spec.GetMessageForInconclusiveResult());
            }
            if ((spec.Status.Success.Value == false))
            {
                Assert.Fail(spec.GetMessageForFailedResult());
            }

            AfterTeardown();
            AfterTeardownExtension();
        }
        
        // TestComment
        [TestMethod()]
        public virtual void ObjectFeedFixture()
        {
            SpecificationDefinition spec = new SpecificationDefinition();
            Get_ObjectFeedFixture(spec);
            spec.CalculateResult();

            if ((spec.Status.Success.HasValue == false))
            {
                Assert.Inconclusive(spec.GetMessageForInconclusiveResult());
            }
            if ((spec.Status.Success.Value == false))
            {
                Assert.Fail(spec.GetMessageForFailedResult());
            }
        }
        
        [SpecificationProviderAttribute(Name="ObjectFeedFixture")]
        public virtual void Get_ObjectFeedFixture(Expect.Core.SpecificationDefinition spec)
        {
            spec.Context = Context;
            spec.Name = "ObjectFeedFixture";
            FixtureDefinition fixture = null;

            fixture = spec.AddFixture<DescriptionFixture>();
#line 1
            fixture.WithRow("Sometimes, when writing specification, you just need to fill some poco objects. O" +
                    "bject feed fixture allow you to fill properties for an object by using reflectio" +
                    "n.");
#line 2
            fixture.WithRow("With ObjectFeedFixture, the object must reside in the context.");
#line hidden
            fixture.EndRun();

            fixture = spec.AddFixture<DescriptionFixture>();
#line 4
            fixture.WithRow("The following example illustrate the use of ObjectFeedFixture :");
#line hidden
            fixture.EndRun();

            fixture = spec.AddFixture();
#line 6
            fixture.WithRow("I create a contract", "My new customer", "");
#line hidden
            fixture.EndRun();

            fixture = spec.AddFixture();
#line 8
            fixture.WithRow("In the contract", "My new customer", ", I set :");
#line 9
            fixture.WithRow("Start date", "05/05/2010");
#line 10
            fixture.WithRow("Amount", "2000");
#line hidden
            fixture.EndRun();

            fixture = spec.AddFixture();
#line 12
            fixture.WithRow("The contract date for", "My new customer", "must be", "05/05/2010", "");
#line 13
            fixture.WithRow("The contract amount for", "My new customer", "must be", "2000", "");
#line hidden
            fixture.EndRun();

            fixture = spec.AddFixture<DescriptionFixture>();
#line 15
            fixture.WithRow("The first fixture creates a SampleContract object and put it in the context data " +
                    "under the name \"My new customer\".");
#line 16
            fixture.WithRow("The second fixture is an ObjectFeedFixture that fill the poco ");
#line 17
            fixture.WithRow("The last fixtures just checks that ObjectFeedFixture properly fill the contract");
#line hidden
            fixture.EndRun();

            fixture = spec.AddFixture<DescriptionFixture>();
#line 19
            fixture.WithRow("{{");
#line 20
            fixture.WithRow("class SampleContract");
#line 21
            fixture.WithRow("    {");
#line 22
            fixture.WithRow("        public DateTime StartDate { get; set; }");
#line 23
            fixture.WithRow("        public double Amount { get; set; }");
#line 24
            fixture.WithRow("    }");
#line 25
            fixture.WithRow("}}");
#line hidden
            fixture.EndRun();

        }
    }
}
